<!DOCTYPE HTML>
<html>
<head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>
        个人主页
    </title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp">

    {% include 'public_css.html' %}
    <style type="text/css">
        .bodybg {
        width: 100%;
        background: #272727;
        height: 100%;
        }
    </style>

</head>

<body class="bodybg">
{% include 'home/public_header.html' %}

{% include 'account/head_bar.html' %}
<!-- leftbar end -->
<div class="container">
    <br>

    <div id="leftbar_div" align="center">
        <div style=";background-color:white;">

            {% ifequal obj.session.webStatus 'HasLogin' %}
            <div style="padding-top:20px;">
                <a href="{{ obj.session.portraitUri }}">
                    <img width="75" height="75" src="{{ obj.session.portraitUri }}" alt="无图" class="img-circle ">
                </a>
            </div>
            {% else %}
            <div style="padding-top:20px;">
                <a href="/static/default/pic/default_nopic.png">
                    <img width="75" height="75" src="/static/default/pic/default_nopic.png" alt="无图"
                         class="img-circle ">
                </a>
            </div>
            {% endifequal %}
            <br>

            <div id="nick_name" align="center" class="container-fluid">

                <h4>
                    <b>
                        "{{ obj.user.nickname }}"
                    </b>
                    <small style="color:red;">
                        {{ obj.loveStatus }}
                    </small>
                </h4>
            </div>
            <br>

            <!-- more list -->
            <div class="container-fluid">
                <div class="list-group">
                    <a href="#" class="list-group-item list-group-item-success">
                        帐号设置
                    </a>

                    <div class="panel panel-default">
                        <div class="panel-body">
                            <!-- info form -->
                            <form action="" method="POST" enctype="multipart/form-data">
                                <div class="form-group" align="left">
                                    <label for="userid">
                                        帐号：
                                    </label>
                                    {{ obj.session.userId }}
                                </div>

                                <div class="form-group" align="left">
                                    <label for="nickname">
                                        昵称：
                                    </label>
                                    <input id="nickname_input" name="nickname_input" type="text" class="form-control"
                                           value="{{ obj.user.nickname }}">
                                </div>

                                <div class="form-group" align="left">
                                    <label for="useremail">
                                        邮箱：
                                    </label>
                                    {{ obj.user.email }}
                                </div>

                                <br>

                                <div class="form-group" align="left">
                                    <label for="family">
                                        归属：
                                    </label>
                                    {%if obj.lover.nickname %}
                                    <a href="/account/user/{{obj.lover.id}}/">

                                        {{ obj.lover.nickname }}

                                    </a>
                                    的伴侣&nbsp&nbsp&nbsp<a href=""></a>
                                    {% else %}
                                    无伴侣
                                    {% endif %}
                                </div>
                                <p>
                                    <font color="#f47920">
                                        {{ obj.togeTime }}
                                        <br>在一起：
                                        <!-- 共

                                      <font color="red" size="5">
                                        1000
                                      </font>
                                      天			 -->
                                    </font>
                                </p>
                                <button type="submit" class="btn btn-primary">
                                    确认修改
                                </button>

                                {% csrf_token %}
                            </form>

                            <form action="./uploadimg/" method="POST" enctype="multipart/form-data">

                                <div class="form-group" align="left">

                                    <label for="headimgurl">
                                        设置头像
                                    </label>
                                    <input type="file" id="headimg" name="headimg">

                                    <p class="help-block">
                                        选择一张图片做你的头像，仅限png或者jpg格式
                                    </p>
                                </div>

                                <div id="tipforrevise" align="left"><font color="red"></font></div>
                                <button type="submit" class="btn btn-primary">
                                    上传头像
                                </button>
                                {% csrf_token %}
                            </form>
                            <!-- info form end -->

                        </div>
                    </div>

                    <a href="/account/logout/" class="list-group-item list-group-item-danger">
                        退出
                    </a>
                </div>
            </div>
            <!-- more end -->

        </div>
    </div>
</div>
<!-- leftbar end -->
<br>

<br>
<br>
<br>
{% include 'public_footer.html' %} {% include 'public_js.html' %}
</body>
</html>

